﻿@{
    Layout = null;
}
@*@model System.Data.DataTable*@
@model System.Collections.IEnumerable
<!DOCTYPE html>
<html>
<head>
    <title>文号查询</title>
        @if (false)
    {
        <script src="../../Scripts/jquery-vsdoc.js" type="text/javascript"></script>
        <script src="../../Scripts/ASPxScriptIntelliSense.js" type="text/javascript"></script>
    }
    <link href="@Url.Content("~/Content/Site.css", true)" rel="stylesheet" type="text/css" />
     <script src="@Url.Content("~/Common/GetRootPath.ashx", true)" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.min.js", true)" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/json2.js", true)" type="text/javascript"></script>
@Html.DevExpress().GetStyleSheets(
                new StyleSheet { ExtensionType = ExtensionType.GridView, Theme = DevExpressHelper.Theme },
                new StyleSheet { ExtensionType = ExtensionType.DropDownEdit, Theme = DevExpressHelper.Theme },
                new StyleSheet { ExtensionType = ExtensionType.ComboBox, Theme = DevExpressHelper.Theme }
)
    <script src="@Url.Content("~/Scripts/checkinput.js")" type="text/javascript"></script>
    <style type="text/css">
        #form_query
        {
        }

        input,select
        {
            border: 1px solid #aecaf0;
        }
        input.txt,select.txt
        {
            width: 99%;
        }
        input.btn
        {
            padding: 3px 10px 2px;
            border: #a3c0e8 1px solid;
            background: #e2f0ff url(/EnterpriseFund/DXR.axd?r=0_54) repeat-x 50% top;
            color: #2c4d79;
            cursor: pointer;
        }
        input.btn:hover
        {
            background-image: url(/EnterpriseFund/DXR.axd?r=0_57);
        }
        th
        {
            text-align: right;
        }
    </style>
    
    <script type="text/javascript">
        var rootUrl = '@Url.Content("~/QuerySpecificAdjust/")';


        function OnBeginCallback(s, e) {
            e.customArgs["command"] = e.command;
            e.customArgs["fileNo"] = $("#hidfileNo").val(); 
            e.customArgs["nsrmc"] = $("#hidnsrmc").val(); 
            e.customArgs["financePropNo"] = $("#hidfinancePropNo").val(); 
            e.customArgs["fileName"] = $("#hidfileName").val(); 
            e.customArgs["amount1"] = $("#hidamount1").val();
            e.customArgs["amount2"] = $("#hidamount2").val();
            e.customArgs["FYear"] = $("#hidyear").val();
            
        }


        //查询
        function search() {
            $("#hidfileNo").val(FFileNo.GetText());
            $("#hidnsrmc").val(NSRMC.GetText());
            $("#hidfinancePropNo").val(FFinancePropNo.GetValue());
            $("#hidfileName").val(FFileName.GetText());
            $("#hidamount1").val(FAmount1.GetText());
            $("#hidamount2").val(FAmount2.GetText());
            $("#hidyear").val(FYear.GetText());
            $("#hsearched").val("T");
            gvEditing.Refresh();
        }


        //重置
        function undo() {
            FFileNo.SetText("");
            NSRMC.SetText("");
            FFinancePropNo.SetValue("");
           
            FFileName.SetText("");
            FAmount1.SetText("");
            FAmount2.SetText("");
        }

        function MenuTop_emClick(source, e) {
            switch (e.item.name) {
                case "btnExcel":
                    {
                        if ($("#hsearched").val() == "T") {
                            //if (CheckValues())
                            form_query.target = '_self';
                            form_query.action = rootPath + "/AllowanceFileQuery/ExportToXls";
                            form_query.submit();
                        }
                        break;


                    }
                case "btnReport":
                    {
                        if ($("#hsearched").val() == "T") {
                            window.showModalDialog(rootPath + "/AllowanceFileQuery/Print", window, "dialogWidth=800px;dialogHeight=500px");
                        }

                        //                        //if (CheckValues())
                        //                        form_query.target = '_blank';
                        //                        //  form_query.target = 'parent.contentframe';
                        //                        //  parent.contentframe.url(
                        //                        form_query.action = rootPath + "/AllowanceFileQuery/Print";
                        //                        form_query.submit();
                        break;


                    }

                case "btnGridShow":
                    {
                        gvEditing.ShowCustomizationWindow();
                        break;
                    }
            }
        }
        function keyPress() {
            if (event.keyCode && event.keyCode == 13) {
                search();

            }

        }
    </script>
</head>
<body  onkeypress="keyPress()">
    @Html.Partial("LoadPanelPartial")
    @Html.DevExpress().Menu(settings =>
{
    settings.Name = "toolBarMenu";
    settings.ItemAutoWidth = false;
    settings.Width = System.Web.UI.WebControls.Unit.Percentage(100);
    settings.Styles.Style.Border.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(0);
    settings.Styles.Style.BorderTop.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(1);
    settings.Items.Add(item =>
    {
        item.Name = "btnExcel";
        item.Text = "导出Excel";
        item.Image.Url = Url.Content("~/Content/ControlImages/excel.png");
    });
    settings.Items.Add(item =>
    {
        item.Name = "btnReport";
        item.Text = "打印";
        item.Image.Url = Url.Content("~/Content/icons/print.png");
    });


    settings.Items.Add(item =>
    {
        item.Name = "btnGridShow";
        item.Text = "选择列";
        item.Image.Url = Url.Content("~/Content/FunctionImages/AllowanceFileAudit.png");
    });
	
	
	
    settings.ClientSideEvents.ItemClick = "function(source,e){MenuTop_emClick(source,e)}";
    settings.ItemLinkMode = ItemLinkMode.ContentBounds;
}).GetHtml()
    @using (Html.BeginForm("ExportToXls", "AllowanceFileQuery", FormMethod.Post, new { id = "form_query" }))
    {

   @* <form name="form_query" id="form_query" method="post" class="form_query" action="@Url.Content("~/QuerySpecificAdjust/index")">*@
    <table class="query"  width="800px" style="margin-left: auto; margin-right: auto" >
        <tr>
            <td align="right" style="text-align:right">
                文件号:
            </td>
            <td>
                 @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "FFileNo";
                   settings.Width = System.Web.UI.WebControls.Unit.Pixel(150);
               }).GetHtml()

            </td>
            <td align="right" style="text-align:right">
                纳税人名称:
            </td>
            <td>
            <table>
                    <tr>
                        <td>
                 @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "NSRMC";
                   settings.Width = System.Web.UI.WebControls.Unit.Pixel(147);
               }).GetHtml()
                </td>
                    </tr>
                </table>
            </td>
            <td align="right" style="text-align:right">
                资金性质:
            </td>
            <td>
    @Html.DevExpress().ComboBox(settings =>
               {
                   settings.Name = "FFinancePropNo";
                   settings.Properties.DropDownStyle = DropDownStyle.DropDownList;
                   settings.Width = System.Web.UI.WebControls.Unit.Pixel(150);
                   settings.Properties.TextField = "FFinancePropShortName";
                   settings.Properties.ValueField = "FFinancePropNo";
               }).BindList(ViewData["FinancePropList"]).Bind(ViewData["FFinancePropNo"]).GetHtml()

            </td>
            <td>
                @Html.DevExpress().Button(settings =>
      {
          settings.Name = "btnSearch";
          settings.Text = "查询";
          settings.ControlStyle.CssClass = "button";
          settings.Images.Image.Url = Url.Content("~/Content/ControlImages/search.png");
          settings.ClientSideEvents.Click = "search";
      }).GetHtml()
            </td>
            <td>
                @Html.DevExpress().Button(settings =>
        {
            settings.Name = "btnUndo";
            settings.Text = "重置";
            settings.ControlStyle.CssClass = "button";
            settings.Images.Image.Url = Url.Content("~/Content/ControlImages/undo_blue.png");
            settings.ClientSideEvents.Click = "undo";
        }).GetHtml()
            </td>
        </tr>
        <tr>
            <td align="right" style="text-align:right">
                文件名称:
            </td>
            <td>
           @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "FFileName";
                   settings.Width = System.Web.UI.WebControls.Unit.Pixel(150);
               }).GetHtml()

            </td>
            <td align="right" style="text-align:right">
                补助金额:
            </td>
            <td >
                <table>
                    <tr>
                        <td>
                            @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "FAmount1";
                   settings.Width = System.Web.UI.WebControls.Unit.Pixel(68);
               }).GetHtml()

                        </td>
                        <td align="center">
                            -
                        </td>
                        <td>
                           @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "FAmount2";
                   settings.Width = System.Web.UI.WebControls.Unit.Pixel(68);
               }).GetHtml()

                        </td>
                    </tr>
                </table>
            </td>
            <td  align="right" style="text-align:right">年度:</td>
            <td> @Html.DevExpress().TextBox(settings =>
            {
                settings.Name = "FYear";
                settings.Width = System.Web.UI.WebControls.Unit.Pixel(147);
                settings.Text = ViewData["Year"].ToString();
            }).GetHtml()</td>
            <td colspan="2"></td>
        </tr>
      
    </table>
    @Html.Partial("AllowanceFileQueryPartial", Model)
    

        @Html.Hidden("hidfileNo", "");
         @Html.Hidden("hidnsrmc", "");
    @Html.Hidden("hidyear", "");
         @Html.Hidden("hidfinancePropNo", "");
          @Html.Hidden("hidfileName", "");
           @Html.Hidden("hidamount1", "");
            @Html.Hidden("hidamount2", "");
                                          @Html.Hidden("hsearched", "F")
    }
</body>
</html>
<script>
    lp.Hide();
</script>
